﻿namespace GameDesigner
{
    using System;

    /// <summary>
    /// 动作行为--用户添加的组件 v2017/12/6
    /// </summary>
    [Serializable]
    public class ActionBehaviour : BehaviourBase
    {
        public StateAction Action { get; set; }

        /// <summary>
        /// 当进入状态
        /// </summary>
        public virtual void OnEnter() { }

        /// <summary>
        /// 当更新状态
        /// </summary>
        public virtual void OnUpdate() { }

        /// <summary>
        /// 当状态晚于更新
        /// </summary>
        public virtual void OnLateUpdate() { }

        /// <summary>
        /// 当状态固定更新
        /// </summary>
        public virtual void OnFixedUpdate() { }

        /// <summary>
        /// 当退出状态
        /// </summary>
        public virtual void OnExit() { }

        /// <summary>
        /// 当停止动作 : 当动作不使用动画循环时, 动画时间到达100%后调用
        /// </summary>
        public virtual void OnStop() { }
    }
}